using System;
using System.Text;
using BMCommon;
using HCP.Responses;
using HCP.SimpleJSON;
using JsonFx.Json;

namespace HCP.Requests
{
	public class GetSceneGraph : JobRequest
	{
		public GetSceneGraph(JSONClass json) : base(json)
		{
		}

		public override JobResponse Process()
		{
			SceneGraph get = SceneGraph.Get;
			JsonWriterSettings jsonWriterSettings = new JsonWriterSettings();
			jsonWriterSettings.PrettyPrint = false;
			StringBuilder stringBuilder = new StringBuilder();
			using (JsonWriter jsonWriter = new JsonWriter(stringBuilder, jsonWriterSettings))
			{
				jsonWriter.Write(get);
			}
			return new StringResponse(stringBuilder.ToString());
		}
	}
}
